package com.example.orderservice.feignclient;

import com.example.orderservice.dto.Stock;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient("warehouse-service")
public interface WarehouseServiceFeignClient {

    @GetMapping("/stock")  //OpenFeign 向服务提供者 warehouse-service 的 stock 接口发起 Get 请求
    public Stock getStock(@RequestParam("skuId") Long skuId);

}
